from celery import Celery
# import os,sys
#
# Base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# sys.path.insert(0,Base_dir)

celery_app = Celery('worker')


# include=[] 是任务
# celery_app = Celery('MyCelery',
#             include=['common.send_sms_code']
#             )


# 添加配置文件
celery_app.config_from_object('celery_task.config')
# app.autodiscover_tasks(['celery_tasks.tasks.sms.task.sms_code'])